package gagak.framework.web.handler;


import com.g5.framework.web.interceptor.Interceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/*
 * @program: ce
 * @description: handler执行链 包括拦截器
 * @author: houhong
 * @create: 2022-11-23 17:46
 */
public class HandlerExecutionChain {

    private static Logger logger = LoggerFactory.getLogger(HandlerExecutionChain.class);

    // 处理器
    private final Object handler;

    //拦截器
    private List<Interceptor> interceptorList;

    private int interceptorIndex = -1;

    public HandlerExecutionChain(Object handler, List<Interceptor> interceptorList) {
        this.handler = handler;
        this.interceptorList = interceptorList;
    }

    /*
     * 获取handler
     */
    public Object getHandler() {
        return handler;
    }
}